<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" import="myauctioneer.dto.User" import="myauctioneer.App" %>

<div id="navi">
<% if (user == null) { %>
	<form action="<%= App.getBaseUrl() %>/user/login" method="post">
	<table>
	<tr>
	<td><label for="email">E-Mail</label><br /><input type="text" name="email" id="email" /></td>
	</tr>
	<tr>
	<td><label for="password">Password</label><br /><input type="password" name="password" id="password" /></td>
	</tr>
	<tr>
	<td><input type="submit" value="Login" class="button" /></td>
	</tr>
	</table>
	</form>
	<p><a href="<%= App.getBaseUrl() %>/user/register">Register now</a></p>
<% } else { %>
	<ul>
	<li><a href="<%= App.getBaseUrl() %>/article/createArticle">New Article</a></li>
	<li><a href="<%= App.getBaseUrl() %>/article/showSales">My sales</a></li>
	<li><a href="<%= App.getBaseUrl() %>/article/showPurchases">My purchases</a></li>
	<li><a href="<%= App.getBaseUrl() %>/article/showStatistics">My statistics</a></li>
	<li><a href="<%= App.getBaseUrl() %>/user/logout">Logout</a></li>
	</ul>
	<p>Logged in as: <em><%= user.getName() %></em></p>

	<% if(user.isAdmin()) { %>
	<h2>Admin panel</h2>
	<ul>
	<li><a href="<%= App.getBaseUrl() %>/admin/manageUsers">Manage Users</a></li>
	</ul>
	<% } %>
<% } %>
</div>
<div id="footer">Copyright &copy; 2011 myauctioneer</div>

</div><!-- #container opened in header -->
</body>
</html>
